<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    div {
      margin: 5px;
    }
  .container{
    background-color: aquamarine;
  }

  .container .a,.b,.container .c {
    background-color: gray;
  }
  </style>
</head>
<body>
  <pre>
      div {
        margin: 5px;
      }
    .container{
      height: 100px;
      background-color: aquamarine;
    }
  
    /*注意此处逗号的用法*/
    .container .a, .b, .container .c {
      background-color: gray;
    }
  </pre>
  <div class="container">
    <div class="a">a in container</div>
    <div class="b">b in container</div>
    <div class="c">c in container</div>
  </div>
  <br><br><br>
  <div class="a">a out container</div>
  <div class="b">b out container</div>
  <div class="c">c out container</div>
</body>
</html>